package kpython.backend.ir.tree;

import java.util.LinkedList;
import java.util.List;

public class CallBlock extends Expr{
	public Goto gotoStmt = null;
	public List<Expr> params = new LinkedList<Expr>();
	
	public void addExpr(Expr expr) {
		params.add(expr);
	}
	
	public List<Expr> getParams() {
		return params;
	}
	
	public void printTree(String tab) {
		System.out.println(tab+this.getClass().getSimpleName());		
		for(Expr expr: params) {
			expr.printTree(tab+"\t");			
		}
		gotoStmt.printTree(tab+"\t");
	}
	
	public Object accept(IRTreeVisitor visitor, Object data) {
		return visitor.visit(this, data);
	}
	
	public String toString() {
		return this.getClass().getSimpleName();
	}
}
